﻿#region License
/* ---------------------------------------------------------------- *
 *
 * This file is part of the Xcoordination Application Space
 * ("XcoAppSpace") http://www.xcoordination.com
 *
 * Copyright (C) 2009 Xcoordination http://www.xcoordination.com
 *
 * XcoAppSpace is free software; you can redistribute it and/or
 * modify it under the terms of version 2 of the GNU General
 * Public License as published by the Free Software Foundation.
 *
 * XcoAppSpace is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see http://www.gnu.org/licenses/
 * or write to the Free Software Foundation, Inc., 51 Franklin
 * Street, Fifth Floor, Boston, MA 02110-1301, USA.
 *
 * ---------------------------------------------------------------- */
#endregion

using System;
using Microsoft.Ccr.Core;
using XcoAppSpaces.Contracts.Security;

namespace XcoAppSpaces.Contracts.WorkerResolve
{
	/// <summary>
	/// Message class for a request to resolve a certain worker.
	/// </summary>
	[Serializable]
	public class ResolveRequest
	{
		/// <summary>
		/// Identifier for the worker, built from workertype/workername.
		/// </summary>
		public string WorkerIdentifier { get; set; }

		/// <summary>
		/// The address of the worker.
		/// </summary>
        public string WorkerAddress { get; set; }

		/// <summary>
		/// Unique ID of the request, so the returning response can then be mapped.
		/// </summary>
        public Guid ID { get; set; }

		/// <summary>
		/// Security credentials that should be used to authentication and authorization to access the worker.
		/// </summary>
        public IXcoClientCredentials ClientCredentials { get; set; }

		/// <summary>
		/// Port where the response should be posted.
		/// </summary>
#if !MF
		public Port<ResolveResponse> ResponsePort { get; set; }
#else
        public IPort ResponsePort { get; set; }
#endif
	}
}